package com.example.back.controller;

import com.example.back.common.SimpleEmailSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class QQEmailController {
    @Autowired
    private SimpleEmailSender simpleEmailSender;
    @GetMapping("/sendEmail/{to}/{subject}/{content}")
    public void sendEmail(@PathVariable("to") String to, @PathVariable("subject") String subject, @PathVariable("content") String content) {
        simpleEmailSender.sendTextEmail(to, subject, content);
    }
}
